package router

import (
	"cgs-server/server"
	"cgs-server/server/cgs/app/api"
	"cgs-server/server/cgs/app/store/mongo"
)

func initPublicWorksheetRouter() {
	storeIns, _ := mongo.GetMongoFactory()

	groupHandler := api.NewPublicWorksheetHandler(storeIns)

	server.Get("/api/app/worksheet/public/get", groupHandler.Get, "", server.None)
	server.Post("/api/app/worksheet/public/update", groupHandler.Update, "", server.Login)
	server.Post("/api/app/worksheet/public/ext/addUrl", groupHandler.AddExtUrl, "", server.Login)
	server.Post("/api/app/worksheet/public/ext/deleteUrl", groupHandler.DeleteExtUrl, "", server.Login)
	server.Post("/api/generateQRCode", groupHandler.GenerateQRCode, "", server.Login)
}
